package controller.main;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import dao.memberDao;

public class logoutController implements Controller{
	private memberDao dao;
	public void setDao(memberDao dao){
		this.dao = dao;
	}
	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse arg1) throws Exception {
		HttpSession session = request.getSession(false);
		session.invalidate();
		request.getSession(true).invalidate();

		ModelAndView mav = new ModelAndView();
		mav.setViewName("redirect:/startHome.main");
	
		return mav;
	}
	
	
}
